Skip to contentSkip to conversation

Change in openvpn[master]: openvpnserv: Remove redundant bit-wise operation

Openvpn-devel In review flichtenheld (Code Review) 2 participants 6 messages Apr 7 – Apr 8 1 message not in the archive

lore
Share & tools
lore

A message that is not in the archive (sent off-list or not yet received): gerrit.1775592384000.I7f983168c263e49da7665fc20bd1ecdd426c21d0@...2715...

#1 lore raw

Attention is currently required from: plaisthos.

Hello plaisthos,

I'd like you to do a code review.
Please visit

    http://gerrit.openvpn.net/c/openvpn/+/1623?usp=email

to review the following change.

Change subject: openvpnserv: Remove redundant bit-wise operation
......................................................................

openvpnserv: Remove redundant bit-wise operation

Found by cppcheck.

Change-Id I7f983168c263e49da7665fc20bd1ecdd426c21d0

---
M src/openvpnserv/interactive.c

1 file changed, 1 insertion(+), 1 deletion(-)

git pull ssh://gerrit.openvpn.net:29418/openvpn refs/changes/23/1623/1

src/openvpnserv/interactive.c +1 -1
index a2f9f09..ace25b9 100644
@@ -3410,7 +3410,7 @@
     ea[0].Trustee.TrusteeForm = TRUSTEE_IS_SID;
     ea[0].Trustee.TrusteeType = TRUSTEE_IS_UNKNOWN;
     ea[0].Trustee.ptstrName = (LPWSTR)svc_user->User.Sid;
-    ea[1].grfAccessPermissions = READ_CONTROL | SYNCHRONIZE | PROCESS_VM_READ | SYNCHRONIZE
+    ea[1].grfAccessPermissions = READ_CONTROL | PROCESS_VM_READ | SYNCHRONIZE
                                  | PROCESS_TERMINATE | PROCESS_QUERY_INFORMATION;
     ea[1].grfAccessMode = SET_ACCESS;
     ea[1].grfInheritance = NO_INHERITANCE;

--
To view, visit http://gerrit.openvpn.net/c/openvpn/+/1623?usp=email
To unsubscribe, or for help writing mail filters, visit http://gerrit.openvpn.net/settings?usp=email

Gerrit-MessageType: newchange
Gerrit-Project: openvpn
Gerrit-Branch: master
Gerrit-Change-Id: I7f983168c263e49da7665fc20bd1ecdd426c21d0
Gerrit-Change-Number: 1623
Gerrit-PatchSet: 1
Gerrit-Owner: flichtenheld <[email protected]...>
Gerrit-Reviewer: plaisthos <[email protected]...>
Gerrit-CC: openvpn-devel <[email protected]>
Gerrit-Attention: plaisthos <[email protected]...>

#2 lore raw
In reply to a message not in the archive

Attention is currently required from: flichtenheld, plaisthos.

cron2 has posted comments on this change by flichtenheld. ( http://gerrit.openvpn.net/c/openvpn/+/1623?usp=email )

Change subject: openvpnserv: Remove redundant bit-wise operation
......................................................................

Patch Set 1: Code-Review+2

--
To view, visit http://gerrit.openvpn.net/c/openvpn/+/1623?usp=email
To unsubscribe, or for help writing mail filters, visit http://gerrit.openvpn.net/settings?usp=email

Gerrit-MessageType: comment
Gerrit-Project: openvpn
Gerrit-Branch: master
Gerrit-Change-Id: I7f983168c263e49da7665fc20bd1ecdd426c21d0
Gerrit-Change-Number: 1623
Gerrit-PatchSet: 1
Gerrit-Owner: flichtenheld <[email protected]...>
Gerrit-Reviewer: cron2 <[email protected]...>
Gerrit-Reviewer: plaisthos <[email protected]...>
Gerrit-CC: openvpn-devel <[email protected]>
Gerrit-Attention: plaisthos <[email protected]...>
Gerrit-Attention: flichtenheld <[email protected]...>
Gerrit-Comment-Date: Tue, 07 Apr 2026 20:53:26 +0000
Gerrit-HasComments: No
Gerrit-Has-Labels: Yes

#3 lore raw

PATCH 1/1 openvpnserv: Remove redundant bit-wise operation

In reply to a message not in the archive

From: Frank Lichtenheld <[email protected]...>

Found by cppcheck.

Change-Id I7f983168c263e49da7665fc20bd1ecdd426c21d0

Gerrit URL: https://gerrit.openvpn.net/c/openvpn/+/1623
---

This change was reviewed on Gerrit and approved by at least one developer. I request to merge it to master.

Gerrit URL: https://gerrit.openvpn.net/c/openvpn/+/1623
This mail reflects revision 1 of this Change.

Acked-by according to Gerrit (reflected above):
Gert Doering <[email protected]...>

src/openvpnserv/interactive.c +1 -1
index a2f9f09..ace25b9 100644
@@ -3410,7 +3410,7 @@
     ea[0].Trustee.TrusteeForm = TRUSTEE_IS_SID;
     ea[0].Trustee.TrusteeType = TRUSTEE_IS_UNKNOWN;
     ea[0].Trustee.ptstrName = (LPWSTR)svc_user->User.Sid;
-    ea[1].grfAccessPermissions = READ_CONTROL | SYNCHRONIZE | PROCESS_VM_READ | SYNCHRONIZE
+    ea[1].grfAccessPermissions = READ_CONTROL | PROCESS_VM_READ | SYNCHRONIZE
                                  | PROCESS_TERMINATE | PROCESS_QUERY_INFORMATION;
     ea[1].grfAccessMode = SET_ACCESS;
     ea[1].grfInheritance = NO_INHERITANCE;
#4 lore raw

[Openvpn-devel] [PATCH applied] Re: openvpnserv: Remove redundant bit-wise operation

Maybe it's just me, but I needed to look twice until I saw it... ("SYNCHRONIZE" was or-ed in twice, which won't make it any stronger)
- but then it's quite obviously correct. BB compile-tested for me.

Since this isn't changing/fixing functionality, it does not need to go to 2.7

Your patch has been applied to the master branch.

commit df430b03d5959e87fbf502b7430be07f49a0d0ba

Author: Frank Lichtenheld
Date:   Tue Apr 7 22:53:36 2026 +0200
     openvpnserv: Remove redundant bit-wise operation

     Signed-off-by: Frank Lichtenheld <[email protected]...>
     Acked-by: Gert Doering <[email protected]...>
     Gerrit URL: https://gerrit.openvpn.net/c/openvpn/+/1623
     Message-Id: <[email protected]...>
     URL: https://www.mail-archive.com/[email protected]/msg36547.html
     Signed-off-by: Gert Doering <[email protected]...>

--
kind regards,

Gert Doering

#5 lore raw
In reply to a message not in the archive

cron2 has uploaded a new patch set (#2) to the change originally created by flichtenheld. ( http://gerrit.openvpn.net/c/openvpn/+/1623?usp=email )

The following approvals got outdated and were removed:
Code-Review+2 by cron2

Change subject: openvpnserv: Remove redundant bit-wise operation
......................................................................

openvpnserv: Remove redundant bit-wise operation

Found by cppcheck.

Change-Id I7f983168c263e49da7665fc20bd1ecdd426c21d0

Gerrit URL: https://gerrit.openvpn.net/c/openvpn/+/1623
Message-Id: <[email protected]...>
URL: https://www.mail-archive.com/[email protected]/msg36547.html

---
M src/openvpnserv/interactive.c

1 file changed, 1 insertion(+), 1 deletion(-)

git pull ssh://gerrit.openvpn.net:29418/openvpn refs/changes/23/1623/2

src/openvpnserv/interactive.c +1 -1
index c96d3f2..4268214 100644
@@ -3410,7 +3410,7 @@
     ea[0].Trustee.TrusteeForm = TRUSTEE_IS_SID;
     ea[0].Trustee.TrusteeType = TRUSTEE_IS_UNKNOWN;
     ea[0].Trustee.ptstrName = (LPWSTR)svc_user->User.Sid;
-    ea[1].grfAccessPermissions = READ_CONTROL | SYNCHRONIZE | PROCESS_VM_READ | SYNCHRONIZE
+    ea[1].grfAccessPermissions = READ_CONTROL | PROCESS_VM_READ | SYNCHRONIZE
                                  | PROCESS_TERMINATE | PROCESS_QUERY_INFORMATION;
     ea[1].grfAccessMode = SET_ACCESS;
     ea[1].grfInheritance = NO_INHERITANCE;

--
To view, visit http://gerrit.openvpn.net/c/openvpn/+/1623?usp=email
To unsubscribe, or for help writing mail filters, visit http://gerrit.openvpn.net/settings?usp=email

Gerrit-MessageType: newpatchset
Gerrit-Project: openvpn
Gerrit-Branch: master
Gerrit-Change-Id: I7f983168c263e49da7665fc20bd1ecdd426c21d0
Gerrit-Change-Number: 1623
Gerrit-PatchSet: 2
Gerrit-Owner: flichtenheld <[email protected]...>
Gerrit-Reviewer: cron2 <[email protected]...>
Gerrit-Reviewer: plaisthos <[email protected]...>
Gerrit-CC: openvpn-devel <[email protected]>

#6 lore raw
In reply to a message not in the archive

cron2 has submitted this change. ( http://gerrit.openvpn.net/c/openvpn/+/1623?usp=email )

Change subject: openvpnserv: Remove redundant bit-wise operation
......................................................................

openvpnserv: Remove redundant bit-wise operation

Found by cppcheck.

Change-Id I7f983168c263e49da7665fc20bd1ecdd426c21d0

Gerrit URL: https://gerrit.openvpn.net/c/openvpn/+/1623
Message-Id: <[email protected]...>
URL: https://www.mail-archive.com/[email protected]/msg36547.html

---
M src/openvpnserv/interactive.c

1 file changed, 1 insertion(+), 1 deletion(-)
src/openvpnserv/interactive.c +1 -1
index c96d3f2..4268214 100644
@@ -3410,7 +3410,7 @@
     ea[0].Trustee.TrusteeForm = TRUSTEE_IS_SID;
     ea[0].Trustee.TrusteeType = TRUSTEE_IS_UNKNOWN;
     ea[0].Trustee.ptstrName = (LPWSTR)svc_user->User.Sid;
-    ea[1].grfAccessPermissions = READ_CONTROL | SYNCHRONIZE | PROCESS_VM_READ | SYNCHRONIZE
+    ea[1].grfAccessPermissions = READ_CONTROL | PROCESS_VM_READ | SYNCHRONIZE
                                  | PROCESS_TERMINATE | PROCESS_QUERY_INFORMATION;
     ea[1].grfAccessMode = SET_ACCESS;
     ea[1].grfInheritance = NO_INHERITANCE;

--
To view, visit http://gerrit.openvpn.net/c/openvpn/+/1623?usp=email
To unsubscribe, or for help writing mail filters, visit http://gerrit.openvpn.net/settings?usp=email

Gerrit-MessageType: merged
Gerrit-Project: openvpn
Gerrit-Branch: master
Gerrit-Change-Id: I7f983168c263e49da7665fc20bd1ecdd426c21d0
Gerrit-Change-Number: 1623
Gerrit-PatchSet: 2
Gerrit-Owner: flichtenheld <[email protected]...>
Gerrit-Reviewer: cron2 <[email protected]...>
Gerrit-Reviewer: plaisthos <[email protected]...>
Gerrit-CC: openvpn-devel <[email protected]>